<!DOCTYPE HTML>
<html style="background: #f3f3f3;">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>签约网</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <link rel="stylesheet" type="text/css" href="../css/lawyer.css" />
    <script type="text/javascript" src="../script/api.js"></script>
    <script type="text/javascript" src="../script/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="../script/mobile.js"></script>
    <script type="text/javascript" src="../script/lawyer.js"></script>
</head>
<body>
<div id="secHeader">
  <header class="header">
      <a href="javascript:void(0);" onclick="api.closeWin()" class="back_btn"><img src="../image/head-fanhui.png" alt=""></a>
      <h2>罪名解析</h2>
   <!--    <a href="javascript:void (0);" class="search_btn"><img src="../image/search.png" alt=""></a> -->
  </header>
</div>

<section class="list_analysis">
     <div class="contract_search" style="width: 94%; margin-left: 3%">
        <form action="" onsubmit="return false;"><input type="text" placeholder="搜索罪名解析" id="key"></form>

    </div>
    <div class="analysis_list">
        <ul id='con'>


        </ul>
    </div>
</section>


</body>

<script>
    var page=0;
    var p='';
    var para='';
    var name = '';
    $('form').on('submit', function(e){
        name=$('#key').val();
        page=0
        toDoRequest()
    });

    apiready = function () {
       $api.fixStatusBar( $api.dom('#secHeader') );
      api.setStatusBarStyle({
          style: 'light'
      });



        para=api.pageParam;



        toDoRequest();
    };

    function toDoRequest(){
        page++;
        p= {model:'zuim',name:name};
        //alert(JSON.stringify(p));
        api.ajax({
                url: webSiteUrl+'/app/home/lists',
                method: 'post',
                data: {
                    values: p
                }
            }, function(ret, err) {
                api.hideProgress();

                if(ret.code==200){

                    html = "";
                    var tj=ret.data;
                    if(tj != null){

                    for(var i=0;i<tj.length;i++){
                        html+='  <li onclick="zuimdetail('+tj[i].id+')"><a href="javascript:;">'+tj[i].name+'</a></li>';
                    }
                    }

                    $('#con').html(html);




                }else{

                        $('#con').html('<p style="text-align:center">暂无数据</p>');


                }
            });

    }



    function zuimdetail(id){
        api.openWin({
            name: 'zuimdetail',
            url: 'zuimdetail.html',
            reload:true,
            pageParam: {
                id: id,
            }
        });
    }


</script>
</html>
